package com.uni.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.uni.common.util.SystemConfig;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@NoArgsConstructor
@Data
public class UserCommentInformDTO {

    //评论id
    private Long id;
    private Long sourceId;
    private String content;
    private Integer commentNumber;
    private Integer likeNumber;
    //    private Long oneLevelCommentId;
//    private Long parentId;
    @JsonFormat(timezone = "GMT+8", pattern = "YYYY-MM-dd HH:mm:ss")
    private Date createTime;
    private Long userid;
    private String nickname;
    private String profilePhoto;
    private Long parentUserId;
    private String parentUserNickname;
    private Long oneLevelCommentId;
    private Integer deleted;
    private int checkMe;
    private int checkLike;
    private int type;
    public String getProfilePhotoAll() {
        if(profilePhoto != null && !"".equals(profilePhoto) && !profilePhoto.startsWith("http")) {
            return SystemConfig.basePath + profilePhoto;
        }
        return profilePhoto;
    }
    List<UserCommentInformDTO> underUserCommentInform;
}
